package com.example.campus.search;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.PostConstruct;

@SpringBootApplication
public class CampusSearchApplication {
    @PostConstruct
    public void init() {
        // 解决netty启动冲突的问题（主要体现在启动redis和elasticsearch）
        // 可以看Netty4Util.setAvailableProcessors(..)
        System.setProperty("es.set.netty.runtime.available.processors", "false");
    }
    public static void main(String[] args) {
        SpringApplication.run(CampusSearchApplication.class, args);
    }

}
